package com.yun.zf.common.admin.model.order;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class SubOrderMo {

    // 款项类型，1 为业主款项， 2为客户款项
    @ApiModelProperty(value = "款项类型1 为业主款项， 2为客户款项")
    private int moneyType;

    // 款项说明
    @ApiModelProperty(value = "款项说明")
    private String moneyExplain;

    /**
     * 款项金额
     */
    @ApiModelProperty(value = "款项金额")
    private BigDecimal amount;

    // 折扣系数
    @ApiModelProperty(value = "折扣系数")
    private  BigDecimal rate;

    public BigDecimal getAmount() {
        return amount.setScale(2,BigDecimal.ROUND_HALF_UP);
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getRate() {
        return rate.setScale(2,BigDecimal.ROUND_HALF_UP);
    }

    public void setRate(BigDecimal rate) {
        this.rate = rate;
    }
}
